<#assign contextPath = springMacroRequestContext.getContextPath()/>
<#import "/public/frame/main.html" as frame/>
<@frame.head "南航明珠商城-签到管理-签到配置页"></@frame.head>
<table class="table" style="width: 535px;">
  <tr style="height: 55px;">
    <td colspan="2">
      <span class="select-box radius" style="width: 150px;">
        <select class="select" id="isOpen" onchange="isOpenChange();" style="width: 140px;">
          <option value="0" <#if !signConfig?? || 0 == signConfig.isOpen>selected = "selected"</#if>>关闭</option>
          <option value="1" <#if signConfig?? && 1 == signConfig.isOpen>selected = "selected"</#if>>开启</option>
        </select>
      </span>
      <label>&nbsp;&nbsp;签到模块</label>
    </td>
  </tr>
  <tr class="openClass" style="height: 55px;">
    <td>
      <div class="radio-box">
        <input type="radio" id="hasStartDate1" name="hasStartDate" value="0" <#if !signConfig?? || signConfig.hasStartDate == null || 0 == signConfig.hasStartDate>checked="checked"</#if>/>
        <div style="padding-top: 3px;"><label for="hasStartDate1" style="cursor: pointer;">无开始时间</label></div>
      </div>
      <div class="radio-box">
        <input type="radio" id="hasStartDate2" name="hasStartDate" value="1" <#if signConfig?? && 1 == signConfig.hasStartDate>checked="checked"</#if>/>
        <div style="padding-top: 3px;"><label for="hasStartDate2" style="cursor: pointer;">有开始时间</label></div>
      </div>
    </td>
    <td class="startDateTdClass">
      <div style="display: table-cell; padding-top: 5px;"><label>开始时间&nbsp;</label></div>
      <div style="display: table-cell; padding-top: 5px;">
        <input id="startDate" name="startDate" class="input-text radius Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endDate\')}',readOnly: true})" 
        style="width: 180px;" <#if signConfig?? && 1 == signConfig.hasStartDate>value='${(signConfig.startDate?string("yyyy-MM-dd HH:mm:ss"))!}'</#if>/>
        <font style="color: red;">*</font>
      </div>
    </td>
  </tr>
  <tr class="openClass" style="height: 55px;">
    <td>
      <div class="radio-box">
        <input type="radio" id="hasEndDate1" name="hasEndDate" value="0" <#if !signConfig?? || signConfig.hasEndDate == null || 0 == signConfig.hasEndDate>checked="checked"</#if>//>
        <div style="padding-top: 3px;"><label for="hasEndDate1" style="cursor: pointer;">无结束时间</label></div>
      </div>
      <div class="radio-box">
        <input type="radio" id="hasEndDate2" name="hasEndDate" value="1" <#if signConfig?? && 1 == signConfig.hasEndDate>checked="checked"</#if>/>
        <div style="padding-top: 3px;"><label for="hasEndDate2" style="cursor: pointer;">有结束时间</label></div>
      </div>
    </td>
    <td class="endDateTdClass">
      <div style="display: table-cell; padding-top: 5px;"><label>结束时间&nbsp;</label></div>
      <div style="display: table-cell; padding-top: 5px;">
        <input id="endDate" name="endDate"  class="input-text radius Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startDate\')}',readOnly: true})" 
        style="width: 180px;" <#if signConfig?? && 1 == signConfig.hasEndDate>value='${(signConfig.endDate?string("yyyy-MM-dd HH:mm:ss"))!}'</#if>/>
        <font style="color: red;">*</font>
      </div>
    </td>
  </tr>
  <tr style="height: 55px;">
    <td colspan="2">
      <button type="button" class="btn btn-success radius" onclick="save();" style="margin-top: 10px;">保存</button>
    </td>
  </tr>
</table>
<hr style="height:18px;border:none;border-top:2px solid #DDDDDD;" />
<div style="display: table-cell;">最后修改人：<#if signConfig??>${signConfig.updateUser}<#else>无</#if></div>
<div style="display: table-cell;padding-left: 60px;">修改时间：<#if signConfig??>${(signConfig.updateTime?string("yyyy-MM-dd HH:mm:ss"))!}<#else>无</#if></div>
<@frame.end "default"></@frame.end>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/sign/signConfig.js"></script>
<script type="text/javascript">
	var path = "${contextPath}";
</script>